Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Also try codespell #51706

Closed
wants to merge 42 commits into from
Closed

CI: Also try codespell #51706

wants to merge 42 commits into from

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Oct 14, 2023

@DilumAluthge DilumAluthge added the ci Continuous integration label Oct 14, 2023
Note: In #25532, `findn(x::AbstractArray)` was deprecated in favor of `findall(!iszero, x)`. However, the word `findn` will still appear in various places, such as `HISTORY.md`, so we should probably ignore it from `codespell`.
Note: In #12131, `whos` was renamed to `varinfo`. However, the name `whos` still appears in the `HISTORY.md` file, and thus we probably need to ignore it from `codespell`.
`caf` is used in an example in `HISTORY.md`.
`dout` is used as a variable name in `./stdlib/FileWatching/test/runtests.jl`.
`afile.txt` is used as a filename in `./stdlib/FileWatching/test/runtests.jl`.
`te` is used in some strings in `./stdlib/Printf/test/runtests.jl`
`fo` is used in some strings in `./stdlib/Printf/test/runtests.jl`
On Windows, SEH = Structured Exception Handling.
@LilithHafner
Copy link
Member

As a point of comparison, typos got 208 legitimate typos and 58 explicit exclusions (23 of which could be remove if crate-ci/typos#852 is implemented)

exclusions (typos.toml)
default.extend-ignore-identifiers-re = ["^[a-zA-Z][a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"]

[default.extend-words]
ba = "ba"
egal = "egal"
parm = "parm"
modul = "modul"
nd = "nd"
strat = "strat"
WRONLY = "WRONLY"
thisy = "thisy"
vally = "vally"
Ot = "Ot"
clos = "clos"
applys = "applys"
findn = "findn"
mis = "mis"
seh = "seh"
ue = "ue"
Missings = "Missings"
SOM = "SOM"
sais = "sais"
Merly = "Merly"
Filetimes = "Filetimes"
HSA = "HSA"
Strategems = "Strategems"
anumber = "anumber"
uupper = "uupper"
shttp = "shttp"
ser = "ser"
somes = "somes"
sav = "sav"
egals = "egals"
OLT = "OLT"
eyt = "eyt"
matc = "matc"
nam = "nam"
alls = "alls"
noe = "noe"

# strings in tests directories
fo = "fo"
Uest = "Uest"
Dows = "Dows"
aquire = "aquire"

# typos that are programmatically observable
compileable = "compileable"
overlayed = "overlayed"

[default.extend-identifiers]
mrs_claus = "mrs_claus"
womens = "womens"
breal = "breal"
Breal = "Breal"
Numer = "Numer"
splitted = "splitted"
affinitized = "affinitized"
key_smove = "key_smove"
readed_zero = "readed_zero"
check_inconsistentcy = "check_inconsistentcy"
L_OP_CALLL = "L_OP_CALLL"
OP_CALLL = "OP_CALLL"

# strings in test directories
Facilisi = "Facilisi"
vailable = "vailable"

# typos that are programmatically observable
supress_output = "supress_output"
hashs_seed = "hashs_seed"

@LilithHafner
Copy link
Member

LilithHafner commented Oct 14, 2023

After applying corrections from typos, codespell found 12 more typos.

Some specific invocations and how they are affected by #51709

codespell -r "[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]+" base src doc/src contrib | wc -l
Number of typos found: 225 -> 180
% of reports that are true positives: 20%
true positives: 45

typos . --format brief --config ../julia/typos.toml | wc -l (without a list of false positives, just the regex)
Number of typos found: 847 -> 658
% of reports that are true positives: 22%
true positives: 189

typos . --format brief --config ../julia/typos.toml | wc -l (with crate-ci/typos#852 emulated by having typos.toml contain an explicit list of every 4 or fewer letter word)
Number of typos found: 355 -> 168
% of reports that are true positives: 52%
true positive: 187

@LilithHafner
Copy link
Member

Also, I find typos easier to work with and less flakey/buggy.

@LilithHafner LilithHafner mentioned this pull request Oct 16, 2023
3 tasks
Base automatically changed from lh/spell to master October 24, 2023 13:25
@giordano giordano deleted the dpa/codespell branch February 25, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants